<?xml version="1.0" encoding="UTF-8"?>


<ui:composition xmlns="http://www.w3c.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:p="http://primefaces.org/ui" xmlns:f="http://java.sun.com/jsf/core" xmlns:c="http://java.sun.com/jsp/jstl/core">
	<div class="span12">
		<div id="myCarousel" class="carousel slide">
			<div class="carousel-inner">
				<ui:repeat var="anuncio" value="#{homeControlador.anuncios}">
					<div class="item">
						<a href="pics/#{anuncio.urlImagemPrincipal}"><img src="pics/#{anuncio.urlImagemPrincipal}" alt="" style="width: 100%; height: 281px;" /></a>
						<div class="carousel-caption">
							<h4>#{anuncio.veiculo.modelo.marca.nome} - #{anuncio.veiculo.modelo.nome}</h4>
							<p>Ano #{anuncio.veiculo.anoVersao}, #{anuncio.quilometragem} KMs rodados</p>
						</div>
					</div>
				</ui:repeat>
			</div>
			<a class="carousel-control left" href="#myCarousel" data-slide="prev">&#8249;</a>
			<a class="carousel-control right" href="#myCarousel" data-slide="next">&#8250;</a>
		</div>
	</div>
	<script type="text/javascript">
		$('div.item:first').attr('class','active item');
		
		$(".carousel").carousel({
			interval: 5000
		});
	</script>
</ui:composition>